﻿<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
	<title>Basic Knockout Tutorial. Step 2.</title>
	<script type="text/javascript" src="../lib/html.js"></script>
	<script type="text/javascript" src="../lib/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="../lib/knockout-3.1.0.js"></script>
	<link rel="stylesheet" type="text/css" href="../lib/styles.css"/>
	
	<script type="text/javascript">
		// This is a simple *viewmodel* - JavaScript that defines the data and behavior of your UI
		function AppViewModel() {
			this.firstName = ko.observable("Bert");
			this.lastName = ko.observable("Bertington");
		}

		$(function(){
			// Activates knockout.js
			ko.applyBindings(new AppViewModel());
		});
	</script>
	
</head>
<body>
	<h1>Basic Knockout Tutorial. Step 2.</h1>
	<p>Для отслеживания изменений полей данных используется шаблон <span class="code">observable</span>.</p>
	
	<div class="samplePanel">
		<!-- This is a *view* - HTML markup that defines the appearance of your UI -->
		<p>First name: <input data-bind="value: firstName" /></p>
		<p>Last name: <input data-bind="value: lastName" /></p>
	</div>
	<p class="mainLink"><a href="../index.html">На главную</a></p>
</body>
</html>